# Java Field

class JavaField(object):
    def __init__(self, modify, isFinal, isStatic, fieldType, name, value):
        self.modify = modify
        self.isFinal = isFinal
        self.isStatic = isStatic
        self.fieldType = fieldType
        self.name = name
        self.value = value

    def __str__(self):
        fieldStr = self.modify
        if self.isFinal:
            fieldStr += " final"
        if self.isStatic:
            fieldStr += " static"
        fieldStr += " " + self.fieldType
        fieldStr += " " + self.name
        if self.value is not None and len(self.value) != 0:
            fieldStr += " =" + self.value + ";"
        else:
            fieldStr += ";"
        return fieldStr

    __repr__ = __str__


if __name__ == '__main__':
    field = JavaField('private', False, True, 'String', 'textStr', '\"test\"')
    print(field)
